<script setup>
import { ref } from 'vue';
//引入组件
import Daytime from '@/views/finance/daytime/Daytime.vue';
import Daytime2 from '@/views/finance/daytime/Daytime2.vue';
import Email from '../email/Email.vue';
import Always from '@/views/finance/always/Always.vue';
// 用于存储从子组件接收到的数据
const receivedData = ref('');
const handleDataFromChild = (data) => {
  // 将接收到的数据赋值给 receivedData
  receivedData.value = data;
};

import Module1 from '@/views/sale/module/module1.vue';
</script>

<template>
  <el-row :gutter="12" class="main">
     <el-col :span="18">
       <!-- 客户信息-->
       <Module1></Module1>
     </el-col>
     <el-col :span="6">
      <el-row :gutter="10">
        <!-- 待办，邮件 -->
        <Email/>
        <el-col :span="24">
          <!-- 日历日程 -->
        </el-col>
        <el-col :span="24">
          <el-card class="days" >
            <el-card class="day">
              <Daytime @send-data="handleDataFromChild"/>
            </el-card>
            <Daytime2 v-if="receivedData"/>
          </el-card>
          <el-card>
            <!-- 常用 -->
            <Always/>
          </el-card>
        </el-col>
       </el-row>
      </el-col>
  </el-row>
</template>

<style>
.day{
  margin: -20px -20px 10px;
}
</style>
